package com.yyf.springboot2.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yyf.springboot2.entity.TOrderlist;
import com.yyf.springboot2.mapper.TOrderlistMapper;
import com.yyf.springboot2.service.TOrderlistService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yyf
 * @since 2019-05-29
 */
@Service
@Transactional

public class TOrderlistServiceImpl extends ServiceImpl<TOrderlistMapper, TOrderlist> implements TOrderlistService {
@Resource
    private  TOrderlistMapper orderlistMapper;

    @Override
    public List<TOrderlist> getListByOrderId(Integer id) {
        QueryWrapper<TOrderlist> ols = new QueryWrapper <>();
        ols.eq("orderId",id);
        return orderlistMapper.selectList(ols);
    }
}
